package com.jtny.nytb.datafilling.service;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;

import com.jtny.nytb.datafilling.dto.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 数据填报管理服务Service接口
 *
 * @author 罗霄林
 * @package com.jtny.nytb.energymonitor.datafilling.service
 * @fileName EnergyPriceTempletService.java
 * @createTime 2023年09月04日 16:33
 * 江投能源技术研究院 版权所有
 */
public interface EnergyPriceTempService {

    @ApiOperation("能源价格模板配置查询")
    @ApiOperationSupport(order = 1)
    @PostMapping("/queryEnergyPriceTempletInfo")
    @ResponseBody
    List<EnergyPriceTempletDTO> queryEnergyPriceTempletInfo(@RequestBody EnergyPriceTempletParamDTO energyPriceTempletParamDTO);


    @ApiOperation("新增能源价格模板配置")
    @ApiOperationSupport(order = 2)
    @PostMapping("/saveEnergyPriceTempletData")
    @ResponseBody
    Boolean saveEnergyPriceTempletData(@RequestBody EnergyPriceTempletParamDTO energyPriceTempletParamDTO);

    @ApiOperation("修改能源价格模板配置")
    @ApiOperationSupport(order = 3)
    @PostMapping("/modfiyEnergyPriceTempletData")
    @ResponseBody
    void modfiyEnergyPriceTempletData(@RequestBody EnergyPriceTempletParamDTO energyPriceTempletParamDTO);

    @ApiOperation("删除能源价格模板配置")
    @ApiOperationSupport(order = 4)
    @GetMapping("/delEnergyPriceTempletData")
    @ResponseBody
    Boolean delEnergyPriceTempletData(@RequestParam("id") String id);


    @ApiOperation("制度和用电名称下拉查询")
    @ApiOperationSupport(order = 5)
    @GetMapping("/queryInstitution")
    @ResponseBody
    Map<String, List<String>> queryInstitution(@RequestParam("typeId") String typeId);

    @ApiOperation("导入分类")
    @ApiOperationSupport(order = 6)
    @PostMapping("/importEnergyPriceTempletData")
    @ResponseBody
    Boolean importEnergyPriceTempletData(@RequestBody List<EnergyPriceTempletParamDTO> energyPriceTempletParamDTO);

    @ApiOperation("根据制度和用能类型查询名称（组名称）")
    @ApiOperationSupport(order = 6)
    @GetMapping("/importEnergyPriceTempletData")
    @ResponseBody
    NameOrGroupContentDTO queryNameByInstitutionAndType(@RequestParam("typeId") String typeId, @RequestParam("institution") String institution);

    @ApiOperation("能源价格模板配置查询")
    @ApiOperationSupport(order = 7)
    @PostMapping("/getEnergyPriceTempletInfo")
    @ResponseBody
    List<EnergyModelDTO> getEnergyPriceTempletInfo(@RequestBody EnergyModelPriceParamDTO energyModelPriceParamDTO);

    @ApiOperation("能源模板删除")
    @ApiOperationSupport(order = 8)
    @PostMapping("/deleteEnergyTemplate")
    @ResponseBody
    void deleteEnergyTemplate(@RequestBody List<EnergyModelPriceDTO> energyModelPriceDTOS);

    @ApiOperation("查询能源模板价格")
    @ApiOperationSupport(order = 9)
    @GetMapping("/seleteEnergyTemplatePrice/{id}")
    @ResponseBody
    List<EnergyModelPriceDTO> seleteEnergyTemplatePrice(@PathVariable("id") Long id);

    @ApiOperation("能源模板详情")
    @ApiOperationSupport(order = 10)
    @GetMapping("/getEnergyTemplateInfo/{id}")
    @ResponseBody
    List<EnergyModelDTO> getEnergyTemplateInfo(@PathVariable("id") Long id);

    @ApiOperation("通过模板id查询所有单价信息")
    @ApiOperationSupport(order = 11)
    @GetMapping("/getEnergyPrice/{id}")
    @ResponseBody
    List<EnergyModelPriceDTO> getEnergyPrice(@PathVariable("id") Long id);

    @ApiOperation("保存能源单价信息")
    @ApiOperationSupport(order = 12)
    @PostMapping("/saveEnergyPrice")
    @ResponseBody
    void saveEnergyPrice(@RequestBody EnergyPriceTempletParamDTO eqtDTO);

    @ApiOperation("能源模板物理删除")
    @ApiOperationSupport(order = 13)
    @GetMapping("/deleteEnergyTemplateById/{id}")
    @ResponseBody
    Boolean deleteEnergyTemplateById(@PathVariable("id") Long id);

}
